<?

class PHP_MVC_View_Form_Helper_Token {

    public function token() {

        require_once("mvc/util/TokenProcessor.php");

        // Save a token
        $token = TokenProcessor::getInstance();
        $token->saveToken($this->pageContext->request);

        $xhtml = "<input type=\"hidden\" ".
                        "name=\"".MVC::TOKEN_KEY."\" ".
                        "value=\"".$this->pageContext->request->getSession()->getAttribute(MVC::TRANSACTION_TOKEN_KEY)."\" />";

        return $xhtml;

    }

}
?>